<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>粘性定位测试</title>
    <style>
        html body {
            margin: 0;
            padding: 0;
        }

        .main-container {
            text-align: center;
        }

        .header {
            height: 40px;
            background-color: orange;
            font-size: 15px;
            line-height: 40px;
            text-align: center;
            position: fixed;
            width: 100%;
        }

        .nav-bar-box {
            height: 40px;
            background-color: skyblue;
            line-height: 40px;
            position: sticky;
            top: 40px;
        }

        .item {
            height: 200px;
            line-height: 200px;
            background-color: gray;
            border-bottom: 1px solid #e6e6e6;
        }

        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-thumb {
            border-radius: 10px;
            background: #99abd2;
        }

        ::-webkit-scrollbar-track {
            border-top-right-radius: 10px;
            border-top-left-radius: 10px;
            border-bottom-right-radius: 10px;
            border-bottom-left-radius: 10px;
            background: #efefef;
        }
    </style>

</head>

<body>
    <div>
        <div>
            <div class="main-container">
                <div class="header">
                    头部
                </div>
                <div>
                    <div class="nav-bar-box">
                        导航栏
                    </div>
                    <div class="content-box">
                        <div class="item">A1</div>
                        <div class="item">A2</div>
                        <div class="item">A3</div>
                        <div class="item">A4</div>
                        <div class="item">A5</div>
                        <div class="item">A6</div>
                        <div class="item">A7</div>
                        <div class="item">A8</div>
                        <div class="item">A9</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>